//
//  PublicMonMethods.m
//  AnXin100
//
//  Created by 王合润 on 10/17/18.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "PublicMonMethods.h"

@implementation PublicMonMethods

+ (void)setupNavigationItems:(UIViewController *)viewController {
    
    /** 导航条左边的按钮 */
    //返回按钮
    UIButton *kfBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [kfBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
    kfBtn.frame = CGRectMake(0, 0, 30, 30);
    [kfBtn addTarget:viewController action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithCustomView:kfBtn];
    viewController.navigationItem.leftBarButtonItem = leftItem;
    
}

+ (void)settitle:(NSString *)title viewController:(UIViewController *)viewController {
    
    [viewController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : COLOR_GREEN, NSFontAttributeName : [UIFont systemFontOfSize:18]}];
    viewController.navigationItem.title = title;
//    viewController.title = title;
    

}


@end
